package doj;

import robocode.Robot;
import robocode.ScannedRobotEvent;
/**
 * Object containing information gathered from ScannedRobotEvent.
 * but includes x, y, futureX, and futureY;
 * @author Jordan Do
 *
 */
public class EnemyRobot extends Robot {
  private String name;
  private double x;
  private double y;
  private double bearing;
  private double heading;
  private double velocity;
  private double energy;
  private double futureX;
  private double futureY;
  private double distance;
  private long time;
  
  /**
   * Default constructor for EnemyRobot.
   */
  public EnemyRobot() {
    //nothing goes here
  }

  /**
   * Updates all settings possible from ScannedRobotEvent object.
   * @param enemy ScannedRobotEvent object
   */
  public void update(ScannedRobotEvent enemy) {
    this.name = enemy.getName();
    this.bearing = enemy.getBearing();
    this.heading = enemy.getHeading();
    this.velocity = enemy.getVelocity();
    this.energy = enemy.getEnergy();
    this.distance = enemy.getDistance();
  }
  /**
   * Setter for the time this robot was updated.
   * @param time time it happened.
   */
  public void setTime(long time) {
    this.time = time;
  }
  
  /**
   * Setter for this robot's X.
   * @param x x coordinate
   */
  public void setX(double x) {
    this.x = x;
  }
  /**
   * Setter for this robot's Y.
   * @param y y coordinate
   */
  public void setY(double y) {
    this.y = y;
  }
  /**
   * Setter for robot's future point.
   * @param futureX x coordinate
   */
  public void setFutureX(double futureX) {
    this.futureX = futureX;
  }
  /**
   * Setter for robot's future point.
   * @param futureY y coordinate
   */
  public void setFutureY(double futureY) {
    this.futureY = futureY;
  }
  
  /**
   * Getter for robot's last scan time.
   * @return long time
   */
  public long getScanTime() {
    return time;
  }
  /**
   * Getter for name.
   * @return String name
   */
  public String getName() {
    return name;
  }
  /**
   * Getter for x.
   * @return double x
   */
  public double getX() {
    return x;
  }
  /**
   * Getter for y.
   * @return double y
   */
  public double getY() {
    return y;
  }
  /**
   * Getter for heading.
   * @return double heading
   */
  public double getHeading() {
    return heading;
  }
  /**
   * Getter for bearing.
   * @return double bearing
   */
  public double getBearing() {
    return bearing;
  }
  /**
   * Getter for velocity.
   * @return double velocity
   */
  public double getVelocity() {
    return velocity;
  }
  /**
   * Getter for energy.
   * @return double energy
   */
  public double getEnergy() {
    return energy;
  }
  /**
   * Getter for distance.
   * @return double distance
   */
  public double getDistance() {
    return distance;
  }
  /**
   * Getter for futureX point.
   * @return double futureX
   */
  public double getFutureX() {
    return futureX;
  }
  /**
   * Getter for futureY point.
   * @return double futureY
   */
  public double getFutureY() {
    return futureY;
  }
}